#include <assert.h>
#include "cooperatorao_factory.h"
#include "cooperatorao_stub4web.h"
#include "cooperatorao_stub4app.h"
//#include "cooperatorao.h"

using namespace b2b2c::cooperator::ao;

bool CCooperatorAoFactory::s_CooperatorAoInit = false;

ICooperatorAo* CCooperatorAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CCooperatorAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_CooperatorAoInit)
        {
            int iRetCode = CCooperatorAo::Initialize();
            assert(iRetCode == 0);
            s_CooperatorAoInit = true;
        }   	
        return (new CCooperatorAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

ICooperatorAoAsyc* CCooperatorAoFactory::GetAsycObject()
{
	return (new CCooperatorAoStub4App);
}
